package com.sqsf.util;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import java.io.IOException;
import java.util.List;

public class MyBatisTest {
    public static void main(String[] args) throws IOException {

        SqlSessionFactory factory = MyBatisUtil.getSqlSessionFactory();

        SqlSession session = factory.openSession();

        List<User> users = session.selectList("user.selectAllUser");

        for(User u:users){
            System.out.println(u);
        }

        session.close();
    }
}
